package com.security.system.service.impl;

import com.security.system.dao.SysUserDao;
import com.security.system.entity.SysUser;
import com.security.system.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    SysUserDao dao;

    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        SysUser sysUserByName = dao.findSysUserByName(username);
        return sysUserByName;
    }

}
